<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>P-dd: A complex filtered example outputting HTML using the TestDatasource</title>
</head>
<body>
<?php
ini_set( 'include_path', '../;.' );
require_once( 'include_package.php' );

include_package( 'Datasources' );
include_package( 'Datasources.Filters' );
include_package( 'DatabaseModel' );
include_package( 'Renderers' );
include_package( 'Renderers.HtmlRenderer' );


$oDatasource = new TestDatasource();

$oStartsWithSocFilter = new Filter_TableStartsWith( 'SOC' );
$oEndsWithActFilter   = new Filter_TableEndsWith( 'TY' );

$oFilter = new Filter_Or( $oEndsWithActFilter, $oStartsWithSocFilter );
$oFilter = new Filter_And( $oFilter, new Filter_TableReferencesTable( $oDatasource, 'SOCIETY', 2 ) );

$oFactory = new DatabaseFactory( new Filtration( $oDatasource, $oFilter ) );
$oDatabase = $oFactory->ConstructDatabase();

echo( HtmlDatabaseRenderer::Render(  new HtmlRendererConfiguration(), $oDatabase ) );

?>
</body>
</html>